import request from '@/config/axios'

// 课时费规则 VO
export interface RulesClasshourVO {
  id: number // 主键ID
  tieId: number // 职称ID
  empType: string // 类型
  amount: number // 课时标准
  reserve: number // 预留金额
}

// 课时费规则 API
export const RulesClasshourApi = {
  // 查询课时费规则分页
  getRulesClasshourPage: async (params: any) => {
    return await request.get({ url: `/pm/rules-classhour/page`, params })
  },

  // 查询课时费规则详情
  getRulesClasshour: async (id: number) => {
    return await request.get({ url: `/pm/rules-classhour/get?id=` + id })
  },

  // 新增课时费规则
  createRulesClasshour: async (data: RulesClasshourVO) => {
    return await request.post({ url: `/pm/rules-classhour/create`, data })
  },

  // 修改课时费规则
  updateRulesClasshour: async (data: RulesClasshourVO) => {
    return await request.put({ url: `/pm/rules-classhour/update`, data })
  },

  // 删除课时费规则
  deleteRulesClasshour: async (id: number) => {
    return await request.delete({ url: `/pm/rules-classhour/delete?id=` + id })
  },

  // 导出课时费规则 Excel
  exportRulesClasshour: async (params) => {
    return await request.download({ url: `/pm/rules-classhour/export-excel`, params })
  },
}